﻿using Abp.AutoMapper;
using Basefr.App.Dtos;
using Paas.Core.Const.Enums;
using Paas.Core.Meta.Entities;
using System;
using System.Collections.Generic;
using System.Text;

namespace Paas.App.Interface.Meta.Dtos
{
    [AutoMap(typeof(MetaField))]
    public class MetaFieldDto : DtoBase<Guid>
    {
        /// <summary>
        /// 字段类型
        /// </summary>
        public MetaDataType MetaDataType { get; set; }

        /// <summary>
        /// 对象所属的应用
        /// </summary>
        public int? ApplicationId { get; set; }

        /// <summary>
        /// 字段所属元数据id
        /// </summary>
        public string ObjectId { get; set; }

        public string Name { get; set; }

        /// <summary>
        /// 对象的显示名称，默认中文
        /// </summary>
        public string Label { get; set; }

        /// <summary>
        /// 应用名.对象名.字段名
        /// </summary>
        public string FullName { get; set; }

        /// <summary>
        /// 描述信息
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 数据类型
        /// </summary>
        public DataType DataType { get; set; }

        /// <summary>
        /// 是否必须
        /// </summary>
        public bool IsRequired { get; set; }
        /// <summary>
        /// 字段长度
        /// </summary>
        public int Length { get; set; }
        /// <summary>
        /// 字段默认值
        /// </summary>
        public string DefaultValue { get; set; }
        /// <summary>
        /// 元数据状态
        /// </summary>
        public MetaStatus CurrentStatus { get; set; }

        /// <summary>
        /// 分组
        /// </summary>
        public string MetaFieldGroup { get; set; }

        /// <summary>
        /// 长度
        /// </summary>
        public int MetaFieldLength { get; set; }

        /// <summary>
        /// 精度
        /// </summary>
        public int MetaFieldPrecision { get; set; }
    }
}
